macro(load_3rdparty)
	# 加载自定义库文件
	FIND_FILE(MYPLUGINS_INCLUDE_DIR include ${CMAKE_SOURCE_DIR}/3rdparty/${CMAKE_SYSTEM_NAME}/plugins NO_DEFAULT_PATH)
	FIND_FILE(MYPLUGINS_LIB_DIR lib ${CMAKE_SOURCE_DIR}/3rdparty/${CMAKE_SYSTEM_NAME}/plugins NO_DEFAULT_PATH)
	# 获取链接库名称
	if(CMAKE_BUILD_TYPE STREQUAL Release)
		set(MYPLUGINS_LIBS doublespinboxplugin spinboxplugin)
	else()
		set(MYPLUGINS_LIBS doublespinboxplugind spinboxplugind)	
	endif()
	
	# 寻找PCL第三方库
	find_package(PCL 1.11.0 REQUIRED)
	include_directories(${PCL_INCLUDE_DIRS})
	message(STATUS "===============>>> PCL_INCLUDE_DIRS=${PCL_INCLUDE_DIRS}")
	link_directories(${PCL_LIBRARY_DIRS})
	add_definitions(${PCL_DEFINITIONS})

	# 加载 vtkWidget 自定义插件
	FIND_FILE(CUS_VTKWIDGET_HEADER_DIR include ${CMAKE_SOURCE_DIR}/3rdparty/${CMAKE_SYSTEM_NAME}/vtkWidget NO_DEFAULT_PATH)
	FIND_FILE(CUS_VTKWIDGET_LIB_DIR lib ${CMAKE_SOURCE_DIR}/3rdparty/${CMAKE_SYSTEM_NAME}/vtkWidget NO_DEFAULT_PATH)
	# 获取链接库名称
	if(CMAKE_BUILD_TYPE STREQUAL Release)
		set(CUS_VTKWIDGET_LIBS vtkGUISupportQt-8.2 vtkGUISupportQtOpenGL-8.2 vtkGUISupportQtOpenGL-8.2 vtkLocalExample-8.2 vtkRenderingQt-8.2 vtkViewsQt-8.2)
	else()
		set(CUS_VTKWIDGET_LIBS vtkGUISupportQt-8.2-gd vtkGUISupportQtOpenGL-8.2-gd vtkGUISupportQtOpenGL-8.2-gd vtkLocalExample-8.2-gd vtkRenderingQt-8.2-gd vtkViewsQt-8.2-gd)
	endif()

	# 加载opencv库
	FIND_FILE(OPENCV_INCLUDE_DIR include ${CMAKE_SOURCE_DIR}/3rdparty/${CMAKE_SYSTEM_NAME}/opencv4100 NO_DEFAULT_PATH)
	FIND_FILE(OPENCV_LIB_DIR lib ${CMAKE_SOURCE_DIR}/3rdparty/${CMAKE_SYSTEM_NAME}/opencv4100 NO_DEFAULT_PATH)
	# 获取链接库名称
	if(CMAKE_BUILD_TYPE STREQUAL Release)
		set(OPENCV_LIBS opencv_world4100)
	else()
		set(OPENCV_LIBS opencv_world4100d)
	endif()


	# 加载大恒相机库
	FIND_FILE(GalaxySDK_INCLUDE_DIR include ${CMAKE_SOURCE_DIR}/3rdparty/${CMAKE_SYSTEM_NAME}/GalaxySDK NO_DEFAULT_PATH)
	FIND_FILE(GalaxySDK_LIB_DIR lib ${CMAKE_SOURCE_DIR}/3rdparty/${CMAKE_SYSTEM_NAME}/GalaxySDK NO_DEFAULT_PATH)
	set(GalaxySDK_LIBS DxImageProc GxIAPI GxIAPICPPEx)

	# 加载数据库连接相关的库
	FIND_FILE(DATABASE_INCLUDE_DIR include ${CMAKE_SOURCE_DIR}/3rdparty/${CMAKE_SYSTEM_NAME}/mariadb NO_DEFAULT_PATH)
	FIND_FILE(DATABASE_LIB_DIR lib ${CMAKE_SOURCE_DIR}/3rdparty/${CMAKE_SYSTEM_NAME}/mariadb NO_DEFAULT_PATH)
	set(DATABASE_LIBS libmariadb)

	# 引入头文件(向工程中添加多个特定头文件搜索路径)
	include_directories(
		${OPENCV_INCLUDE_DIR} 
		${GalaxySDK_INCLUDE_DIR} 
		${DATABASE_INCLUDE_DIR} 
		${MYPLUGINS_INCLUDE_DIR}
		${CUS_VTKWIDGET_HEADER_DIR}
	)

	# 把所有的链接 库目录 封装到一个变量中
	set(APP3RDPARTY_LIB_DIR ${OPENCV_LIB_DIR} ${GalaxySDK_LIB_DIR} ${DATABASE_LIB_DIR} ${MYPLUGINS_LIB_DIR} ${CUS_VTKWIDGET_LIB_DIR})
	
	# 把所有的 库文件名 封装到一个变量中
	set(APP3RDPARTY_LIBS ${OPENCV_LIBS} ${GalaxySDK_LIBS} ${DATABASE_LIBS} ${MYPLUGINS_LIBS} ${PCL_LIBRARIES} ${CUS_VTKWIDGET_LIBS})

	message(STATUS "APP3RDPARTY_LIBS=${APP3RDPARTY_LIBS}")

endmacro()



